/*eslint-disable*/
// 目录 路由

const router = require("koa-router")()

const {
    catalogueApi
} = require("../../../controller/catalogue/catalogue")

const {
    check
} = require("../../../middleware/routercheck")

const { veri } = require("../../../middleware/checkData")

router.get(
    "/catalogue/byid/:id",
    veri(["id"], "Non empty", "params"),
    check("getcatalogue"),
    catalogueApi)
router.get(
    "/catalogue/list",
    check("getcatalogue"),
    catalogueApi)
router.get(
    "/catalogue/all",
    check("getcatalogue"),
    catalogueApi)
router.post(
    "/catalogue/add",
    veri(["title"], "Non empty", "request"),
    check("createcatalogue"),
    catalogueApi)
router.put(
    "/catalogue/edit/:id",
    veri(["id"], "Non empty", "params"),
    check("editcatalogue"),
    catalogueApi)
router.delete(
    "/catalogue/remove/:id",
    veri(["id"], "Non empty", "params"),
    check("removecatalogue"),
    catalogueApi)


module.exports = router